var express = require('express');
var router = express.Router();

const {
  findOrgList,
  insert,
  updateNotice,
  delById
} = require("../controller/organization");
const { authFilter } = require("../middlewares/auth");

class OrgRouter {
  static initRouter() {
    router.get('/', authFilter, findOrgList); // 查询社团
    router.post('/insert', authFilter, insert); // 新增社团
    router.put('/:id', authFilter, updateNotice); // 修改社团
    router.delete('/:id', authFilter, delById); // 删除社团

    return router;
  }
}
module.exports = OrgRouter.initRouter();